<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>收费管理</title>
    <style>
        #sub {
            width: 60px;
            height: 30px;
            text-align: center;
            line-height: 30px;
            background-color: #60ffdb;
            margin-left: 30px;
        }
        .box div {
            height: 3em;
        }
        .box div span {
            display: inline-block;
            width: 150px;
            height: 1.6em;
        }
        .box {
            padding-left: 30px;
            padding-top: 20px;
        }
    </style>
</head>
<body>
    <div class="box">
        <div><span>实名认证费用</span><input name="1" type="number" value="{{$fee_verify['1']}}">元</div>
        <div><span>运营商认证费用</span><input name="2" type="number"  value="{{$fee_verify['2']}}">元</div>
        <div><span>绑卡费用</span><input name="3" type="number"  value="{{$fee_verify['3']}}">元</div>
        <div><span>淘宝认证费用</span><input name="4" type="number"  value="{{$fee_verify['4']}}">元</div>
        <div><span>风控费用</span><input name="5" type="number"  value="{{$fee_verify['5']}}">元</div>
        <div><span>短信费用</span><input name="6" type="number"  value="{{$fee_verify['6']}}">元</div>
    </div>
    <div id="sub">提交</div>
</body>
<script>

    $('#sub').click(function () {
        var verify = $('input[name=1]').val();
        var carrier = $('input[name=2]').val();
        var bank_card = $('input[name=3]').val();
        var taobaoweb = $('input[name=4]').val();
        var risk_controller = $('input[name=5]').val();
        var message = $('input[name=6]').val();
        if(!verify || !carrier || !bank_card || !taobaoweb || !risk_controller || !message){
            alert('选项不充许为空值！');
            return;
        }

        $.ajax({
            headers: {'X-CSRF-TOKEN':'{{csrf_token()}}'},
            url: '/admin/charge/modify',
            type: 'post',
            data: {
                '1': verify,
                '2': carrier,
                '3': bank_card,
                '4': taobaoweb,
                '5': risk_controller,
                '6': message
            },
            success: function (res) {
                alert(res.info);
            }
        })
    });

</script>
</html>